home *** CD-ROM | disk | FTP | other *** search
/ Mission 3 / Mission 3.zip / Mission 3.iso / spiele / sgac / manual / chapter4.doc < prev    next >
Text File  |  1989-07-28  |  8KB  |  199 lines

  1.                         Chapter four
  2.  
  3.                         (Other Zones)
  4.  
  5.    Lines 4150 to 4440  (Speak Events) 
  6.  
  7.  These zones are used for speaking to characters on screen, using 
  8.  them are easy, if you have set them with the creator then you 
  9.  can access them like this.
  10.  
  11.  4150 if Z=1 and LOCATION=4 then print MESSAGE$(9) : DONE=1
  12.  
  13.  So by clicking on a character with the Speak Option enables you 
  14.  to speak, this line checks if Speak Zone 1 has been clicked on 
  15.  and the player's at location four.
  16.  
  17.  You could use a Speak Event to ask a character for an object, 
  18.  this would bring the object from the not created location to the 
  19.  players carried location like so.
  20.  
  21.  4160 if Z=2 and LOCATION=10 and OBLOC(3)=NC then OBLOC(3)=CARRIED 
  22.       : print MESSAGE$(12) : DONE=1
  23.  
  24.  Don't forget the DONE=1 at the end of each line, also remember to 
  25.  add the "and LOCATION=" part to the line otherwise the game will 
  26.  carry out the line in every location with Speak Zones.
  27.  
  28.    Lines 4740 to 5030  (Give Events) 
  29.  
  30.  Give Events are used in the same way as Speak Events except we 
  31.  use it to give objects to another Character.
  32.  
  33.  Every time the Give option is used in the game, the Object ID  
  34.  word is entered into a varible called GIVE$, so we can check for  
  35.  an object being given to a character like this.
  36.  
  37.  4740 if GIVE$="Bag" and Z=1 and LOCATION=15 and BAG=0 then 
  38.         OBLOC(10)=NC : BAG=1 : print MESSAGE$(12) : DONE=1
  39.  
  40.  Note the varible BAG, this is set to nought if the character 
  41.  does'nt have the bag or set to one if he does.
  42.  
  43.  You could use a Special Examine Location Event to tell the player 
  44.  that the character has the bag.
  45.  
  46.    Lines 5790 to 6080  (Open Events) 
  47.  
  48.  Enter in the same way as speak events but used to open.
  49.  
  50.   Example:
  51.  
  52.  5790 if Z=1 and LOCATION=8 and DO=0 then MAP(8,1)=9 : DO=1 : 
  53.        print MESSAGE$(20) : DONE=1
  54.  
  55.  The varible DO would be set to 0 if closed and 1 if open. Note 
  56.  the MAP array is used to connect Exit Zone 1 to location 9.
  57.  
  58.    Lines 6240 to 6530  (Close Events)  
  59.  
  60.  Same as open but used to close things that are open.
  61.  
  62.   Example:
  63.  
  64.  6240 if Z=1 and LOCATION=8 and DO=1 then MAP(8,1)=0 : DO=0 : 
  65.        print MESSAGE$(14) : DONE=1
  66.  
  67.  Note how we now set the DO varible to nought to indicate the door 
  68.  is closed, the Exit Zone is also un-connected.
  69.  
  70.    Lines 6750 to 7040  (Special Wear Events)  
  71.  
  72.  Normally, any object selected to wear would go to the Wear 
  73.  location and the game tells the player he's wearing it. But if 
  74.  the player puts on a robe, it could have special effects on him.
  75.  
  76.  The Object ID word goes into a varible called WEAR$ so we can use 
  77.  this to make wearing the robe create a magical effect.
  78.  
  79.   6750 if WEAR$="Robe" then print MESSAGE$(15) : ROBE=1
  80.  
  81.  Game message 15 could give the player the power to speak to 
  82.  creatures in there own language, this is indicated by the ROBE 
  83.  varible which is set to 1 if he can.
  84.  
  85.    Lines 7250 to 7540  (Special Remove Events)  
  86.  
  87.  As with Remove, this section deals with things happening when an 
  88.  object is removed, removing your clothes would cause no problems 
  89.  in your own house but removing them in the street could get you 
  90.  in trouble. The Object's ID word is entered in a varible called 
  91.  RE$ and is used like this.
  92.  
  93.  7250 if RE$="Clothes" and LOCATION>5 then print MESSAGE$(22) : 
  94.        goto DEATH 
  95.  
  96.  This line would end the game if you removed your clothes in the 
  97.  street, note that the line checks if the player is in one of the 
  98.  locations from five onwards, the first five locations could be 
  99.  the rooms of your house and the rest could be outside.
  100.  
  101.    Lines 7740 to 8030  (Use Object Events) 
  102.  
  103.  Using an object could apply to anything from using a lamp to 
  104.  light it or using a using a guitar, meaning, play it. The Object 
  105.  ID word is entered into a USE$ varible and used like this.
  106.  
  107.   7740 if USE$="Guitar" then print MESSAGE$(6) : DONE=1
  108.  
  109.  This line allows you to play the guitar in any location but it 
  110.  can easily be changed to happen at a certain location to create 
  111.  an effect where the above line would just allow the player to 
  112.  play the guitar and get no responce.
  113.  
  114.  You can also use an Event to light a lamp by defining a lit lamp 
  115.  and an unlit lamp and use the method concern the Vase and Broken 
  116.  Vase in Chapter three.
  117.  
  118.    Lines 8170 to 8460  (Use on Events)  
  119.  
  120.  These events are used for using an object on part of the location 
  121.  picture which can range from using a key on a door to open it or 
  122.  using a sword on a dragon to kill it.
  123.  
  124.  This is done with the USE$ varible and Use Zones like this.
  125.  
  126.  8170 if USE$="Sword" and Z=3 and LOCATION=10 and DRAGON=1 then
  127.        DRAGON=0 : print MESSAGE$(30) : SC=SC+50 : DONE=1
  128.  
  129.  So this line allows you to use a sword on a dragon which is then 
  130.  killed, using this method to unlock a door could be done the same 
  131.  way by simply setting a varible to indicate the state of the 
  132.  door, nought if locked and one if unlocked.
  133.  
  134.    Lines 8640 to 8940  (Consume Events) 
  135.  
  136.  You can use these events to allow the player to eat or drink 
  137.   something, this line allows the player to eat a cake.
  138.  
  139.   8640 if CONSUME$="Cake" then OBLOC(1)=NC : print MESSAGE$(1) : 
  140.         DONE=1
  141.  
  142.  So, once the cake is eaten, it leaves the game by becoming a not 
  143.  created object, if you wanted the cake to contain poison which 
  144.  kills the player when he eats it, all you have to do is add a 
  145.  "goto DEATH" at the end of the above line.
  146.  
  147.    Lines 9000 onwards (Your own routines) 
  148.  
  149.  This section is for your own bits that you may want to add to the 
  150.  game to make it more interesting, it is mainly used to make 
  151.  characters appear on location pictures.
  152.  
  153.  Inside the Garden.dat folder is the source code for Grannies 
  154.   Garden, if you load it and list lines 9000 onwards you will see 
  155.   that we can use the Stos "screen$" command to put the characters 
  156.   on screen. Here is a step by step guide to doing it.
  157.  
  158.  Draw the picture of your character using an art package
  159.  
  160.  Reserve a spare Stos bank and load your picture into it.
  161.  
  162.  Example: reserve as datascreen 4 : load"dwarf.pi1",4
  163.  
  164.  Load the Stos mouse accessory and get the co-ordinates of the 
  165.  picture starting from the top left hand corner of the drawing and 
  166.  noting down the X and Y numbers then do the same for the bottom 
  167.  right hand corner of the drawing.
  168.  
  169.  We can now put this drawing into a varible using SCREEN$.
  170.  
  171.  9010 if LOCATION=5 and DWARF=1 then DWARF$=screen$(4,10,10 to 
  172.        50,50) : screen$(5,100,50)=DWARF$ : screen copy 5 to back : 
  173.        screen copy 5 to physic
  174.  
  175.   9020 return
  176.  
  177.  So the idea is to take the drawing of the dwarf from the picture 
  178.  in bank 4 and enter it into the varible DWARF$ using the first 
  179.  version of screen$ then it is pasted onto the location picture in 
  180.  bank 5 at the co-ordinates 100,50 and the location picture which 
  181.  is always in bank 5 is put back onto the back and physic
  182.  screens.  The RETURN command must be used after the last routine 
  183.  as this section was called by the subroutine at line 500.
  184.  
  185.  Remember that the palette of your drawing must be the same as the 
  186.  one of the location picture.
  187.  
  188.  Well that brings us to the end of the final chapter, I expect you 
  189.  are buzzing with ideas and ready to create your own games, so 
  190.  I'll leave you to it, I hope you enjoy using this package as much 
  191.  as we've enjoyed writing it and if you have any problems or just 
  192.  wish to write for a chat then you can get in touch with us by our 
  193.  address in the intro.doc file.
  194.  
  195.  Happy creating
  196.  
  197.  Deano and Tony of Silly Software.
  198.   
  199.